package com.wish.wishhouse_resource.controller;


import com.wish.wishhouse_resource.entity.TbHouseStyle;
import com.wish.wishhouse_resource.service.ITbHouseStyleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import javax.annotation.Resource;
import java.io.Console;
import java.util.UUID;

/**
 * <p>
 * 集中式房源-房型信息表 前端控制器
 * </p>
 *
 * @author zhangshuxin
 * @since 2021-04-02
 */
@RestController
@RequestMapping("/tbHouseStyle")
public class TbHouseStyleController {

    @Autowired
    private ITbHouseStyleService tbHouseStyleService;

    @RequestMapping("saveFangYuan")
    private ResultEntity saveFangYuan(@RequestBody TbHouseStyle tbHouseStyle){
        System.err.println(tbHouseStyle+"111111111111111111111");
        String fangyuanId = UUID.randomUUID().toString();
        tbHouseStyle.setId(fangyuanId);
        boolean save = tbHouseStyleService.save(tbHouseStyle);
        return ResultEntity.ok("200",save);
    }

}

